#include <iostream>
int fac(int);

int main() {
	int a;
	scanf("%d",&a);
	printf("%d", fac(a));
	return 0;
}
int fac(int a)
{

	if (a == 0 || a == 1) return 1;
	return a*fac(a - 1);

}